-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add rename_vars and rename_dims #3045
Conversation
I uninstalled the bot that automatically closed the pull request #3042 |
FYI the failure in appveyor is unrelated and can be ignored |
Co-Authored-By: Maximilian Roos <5635139+max-sixty@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great! Thanks @jukent
Only items:
- remove miscreant (vscode?) file
- depending on your + others thoughts, change to
rename_variables
- add kwargs test
Co-Authored-By: Maximilian Roos <5635139+max-sixty@users.noreply.github.com>
Co-Authored-By: Maximilian Roos <5635139+max-sixty@users.noreply.github.com>
@jukent You should also give yourself credit in |
Co-Authored-By: Maximilian Roos <5635139+max-sixty@users.noreply.github.com>
FYI tests are failing with |
Huh not sure why that is. I can remove that function and see if it works then. |
I would definitely recommend reading through our contributor's guide on how to setup a local environment for testing your code: http://xarray.pydata.org/en/stable/contributing.html It is much easier to fix issues when you run tests locally rather than waiting on continuous integration tests (Travis-CI) to tell you that things are broken. |
Thank you was just needing to look into this. |
Checks could be more complicated, but I think this is ready to merge! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
whats-new fix required. Otherwise LGTM.
Codecov Report
@@ Coverage Diff @@
## master #3045 +/- ##
==========================================
+ Coverage 93.78% 94.79% +1.01%
==========================================
Files 68 67 -1
Lines 13156 12892 -264
==========================================
- Hits 12338 12221 -117
+ Misses 818 671 -147
Continue to review full report at Codecov.
|
OK fixed whats-new. Sorry it gets a little confusing if there's been a release in the meantime. This looks good to me. @max-sixty check once more and merge? |
Looking at the coverage report from codecov above, it looks like the lines where you raise |
The code looks great now, nice work @jukent - very succinct If we can add that small test that @shoyer references (can do it in one of the existing test, just two lines), and potentially there's a duplication in the whatsnew. (I'm on vacation so don't wait for me to merge) |
Added those tests for for the raised Value Error. |
pep8speaks has a few minor style complaints to fix: #3045 (comment) |
actual_2 = original.rename_vars(**name_dict) | ||
assert_identical(expected, actual_2) | ||
|
||
# Test to raise ValueError |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For future reference, try to leave out redundant comments like this that literally describe how code works. If it would be just as clear to read the code directly, it's best to let code stand on its own.
thanks @jukent ! |
Thanks @jukent! We're happy to have you as a contributor! |
whats-new.rst
for all changes andapi.rst
for new API